import axios from '@/utils/request'
import  qs from 'qs'

export const userList = (params) => {
    return axios({
        method: 'get',
        url: '/Home/GetAllUserInfo',
        params
    })
}

// 手机验证码
export const smsVerification = (params) => {
    return axios({
        method: 'get',
        url: '/Home/GetSmsCode',
        params
    })
}
// 添加注册用户
export const addUsers = (data) => {
    return axios.post('/Home/addUser',
        data
    )
}
// 新增用户注册
export const newUsers = (params) => {
    return axios({
        method: 'get',
        url: '/Home/Register',
        params
    })
}
// 删除用户
export const deleteUser = (params) => {
    return axios({
        method: 'get',
        url: '/Home/deleteUser',
        params
    })
}

// 用户修改密码
export const changePassword = (params) => {
    return axios({
        method: 'get',
        url: '/Home/UpdatePassword',
        params
    })
}

// 重置用户密码
export const resetPassword = (params) => {
    return axios({
        method: 'get',
        url: '/Home/ResetPassword',
        params
    })
}
// 查询权限信息
export const getPermission = (params) => {
    return axios({
        method: 'get',
        url: '/Home/GetPermission',
        params
    })
}

// 添加权限信息
export const addPermission = (params) => {
    return axios({
        method: 'get',
        url: '/Home/AddPermission',
        params
    })
}
// 删除权限信息
export const deletePermission = (params) => {
    return axios({
        method: 'get',
        url: '/Home/DeletePermission',
        params
    })
}
// 获取用户信息
export const getUserInfo = (params) => {
    return axios({
        method: 'get',
        url: '/Home/GetUserInfo',
        params
    })
}
// 搜索用户
export const SearchUser = (params) => {
    return axios({
      method: "get",
      url: "/Home/GetUserList",
      params
    });
  };